home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / visulztn / saoimage / saoimage.lha / vms / ghstname.c < prev    next >
Text File  |  1989-11-10  |  254b  |  12 lines

  1. gethostname (char *node, int nodelen)
  2. {
  3.     char    *p, tmp[32];
  4.  
  5.     strcpy (tmp, getenv("SYS$NODE"));    /* gets NODENAME:: */
  6.     if (p = strchr (tmp, ':'))        /* chop off "::" */
  7.         *p = '\0';
  8.  
  9.     strncpy (node, tmp, nodelen);
  10.     node[nodelen] = '\0';
  11. }
  12.